﻿$.ajaxSetup({ url: "ListSensorAdd.aspx", type: "post", dataType: "text" });
function btnAdd_Click() {

    var code = $("#txtCode").val();
    var meteredCoding = $("#txtMeteredCoding").val();
    var parkingNo = $("#txtParkingNo").val();
    var model = $("#txtModel").val();
    var installtime = $("#txtInstalltime").val();
    var description = $("#txaDescription").val();
    $.ajax({
        data: { method: "AddSensor",
            code: code,
            meteredCoding: meteredCoding,
            parkingNo: parkingNo,
            model: model,
            installtime: installtime,
            description: description
        }
        , success: function (text) {
            alert(text);
        }
    });
}
function init() {
    $("#txtInstalltime").datepicker();
    $("#btnAdd").click(function () {
        btnAdd_Click();
    });
}

